package cn.dakaqi.entities;

import cn.dakaqi.utils.Clock;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Copyright: Copyright (c)2016
 * Company: 志愿者打卡器(www.dakaqi.cn)
 * 类名称: ApproveAddress <br>
 * 类描述: <br>
 *
 * @author: ChunYang.Zhang
 * @since: 2016/9/27 17:09
 * @version: 1.0.0
 */
@Entity
@Table(name = "U_APPROVE_ADDRESS")
@Data
@ToString
public class ApproveAddress extends IdEntity
{
    private static final long serialVersionUID = -2450353768270311658L;
//    `ID` int(11) NOT NULL AUTO_INCREMENT,
//    `ADDRESS_ID` bigint(20) NOT NULL COMMENT '基地base_address表的id',
//        `APPROVE_FIRST` int(3) NOT NULL DEFAULT '0' COMMENT '一审状态：0初始状态(待审核),1审核通过,2拒绝',
//        `APPROVE_SECOND` int(3) NOT NULL DEFAULT '0' COMMENT '终审状态：0初始状态(待审核);1审核通过；2拒绝',
//        `SCORE` int(3) DEFAULT NULL COMMENT '总分',
//        `REMARK` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '一审意见',
//        `REMARK_SECOND` varchar(255) DEFAULT NULL COMMENT '终审意见',
//        `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
//        `UPDATE_TIME_FIRST` datetime DEFAULT NULL COMMENT '一审时间',
//        `UPDATE_TIME_SECOND` datetime DEFAULT NULL COMMENT '二审时间',


    private Long addressId;
    private int approveFirst;
    private int approveSecond;
    private int score;
    private String remark;
    private String remarkSecond;
    private Date createTime;
    private Date updateTimeFirst;
    private Date updateTimeSecond;

    public ApproveAddress()
    {
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public int getApproveFirst() {
        return approveFirst;
    }

    public void setApproveFirst(int approveFirst) {
        this.approveFirst = approveFirst;
    }

    public int getApproveSecond() {
        return approveSecond;
    }

    public void setApproveSecond(int approveSecond) {
        this.approveSecond = approveSecond;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemarkSecond() {
        return remarkSecond;
    }

    public void setRemarkSecond(String remarkSecond) {
        this.remarkSecond = remarkSecond;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTimeFirst() {
        return updateTimeFirst;
    }

    public void setUpdateTimeFirst(Date updateTimeFirst) {
        this.updateTimeFirst = updateTimeFirst;
    }

    public Date getUpdateTimeSecond() {
        return updateTimeSecond;
    }

    public void setUpdateTimeSecond(Date updateTimeSecond) {
        this.updateTimeSecond = updateTimeSecond;
    }

    public ApproveAddress(Long addressId)
    {
        this.addressId = addressId;
        this.approveFirst = 0;
        this.approveSecond = 0;
        this.score = 0;
        this.remark = null;
        this.remarkSecond = null;
        this.createTime = Clock.DEFAULT.getCurrentDate();
        this.updateTimeFirst = null;
        this.updateTimeSecond = null;
    }

    public ApproveAddress(Long addressId, int approveFirst, int approveSecond, int score, String remark, String remarkSecond, Date updateTimeFirst, Date updateTimeSecond)
    {
        this.addressId = addressId;
        this.approveFirst = approveFirst;
        this.approveSecond = approveSecond;
        this.score = score;
        this.remark = remark;
        this.remarkSecond = remarkSecond;
        this.createTime = Clock.DEFAULT.getCurrentDate();
        this.updateTimeFirst = updateTimeFirst;
        this.updateTimeSecond = updateTimeSecond;
    }
}
